Skip to content

Modify get_overview to support duplicate names and provide a simplify… #1629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 27, 2024

Conversation

paulnoirel
Copy link
Contributor

This is a fix for the new get_overview() method.
It now supports the use of duplicate names for reviews and uses "total" instead of "all" following feedback from QA (https://labelbox.atlassian.net/browse/PLT-1012).

There is now an optional parameter to only display the details of the queues when needed:

# Default behaviour
overview = project.get_overview()
print("Output type:", type(overview).__name__)
print(overview.dict())

Result:

Output type: ProjectOverview
{'to_label': 1619, 'in_review': 1757, 'in_rework': 162, 'skipped': 0, 'done': 45844, 'issues': 0, 'labeled': 47764, 'total_data_rows': 49383}

With the details:
In this mode, "in_review" and "in_rework" are a dictionary with the list of the queues (data) with the associated number of data rows, and the total number of data rows.

overview = project.get_overview(details=True)
print("Output type:", type(overview).__name__)
print(overview.dict())

Result:

Output type: ProjectOverviewDetailed
{'to_label': 1619, 'in_review': {'data': [{'April review - Douglas': 0}, {'April review - Joyce': 13}, {'May reviews - Daisy': 0}, {'April review - Sam': 22}, {'April review - Wafula': 12}, {'April/May review - Lilian': 556}, {'April review - kelvin': 0}, {'April/May review - Charles': 0}, {'April review - Samuel': 3}, {'April/May review - Wakairu': 1151}], 'total': 1757}, 'in_rework': {'data': [{'Rework (all rejected)': 162}], 'total': 162}, 'skipped': 0, 'done': 45844, 'issues': 0, 'labeled': 47764, 'total_data_rows': 49383}

@paulnoirel paulnoirel marked this pull request as ready for review May 24, 2024 14:13
@paulnoirel paulnoirel requested a review from a team as a code owner May 24, 2024 14:13
@paulnoirel paulnoirel requested a review from adrian-chang May 27, 2024 09:35
Copy link
Contributor

@adrian-chang adrian-chang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @paulnoirel. Let's merge in once tests are green (I reran).

@paulnoirel paulnoirel merged commit 2e717c8 into develop May 27, 2024
22 checks passed
@paulnoirel paulnoirel deleted the PNO/fix_get_overview branch May 27, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants